package com.nmdl.print.utils;

import com.hprt.lib.mt800.DensityLevel;
import com.hprt.lib.mt800.PrinterState;

public class PrintUtils {
    public static String getDensity(int density) {
        String densityStr = "";
        switch (density) {
            case DensityLevel.LOW:
                densityStr = "低";
                break;
            case DensityLevel.MID:
                densityStr = "中";
                break;
            case DensityLevel.HIGH:
                densityStr = "高";
                break;
        }
        return densityStr;
    }

    public static String getState(int state) {
        String stateStr = "";
        switch (state) {
            case PrinterState.TEMP_TOO_HIGH:
                stateStr = "打印机温度过高!";
                break;
            case PrinterState.POWER_LOW:
                stateStr = "打印机电量过低!";
                break;
            case PrinterState.UNCAP:
                stateStr = "打印机开盖!";
                break;
            case PrinterState.CARBON_MISS:
                stateStr = "打印机碳带用尽!";
                break;
            case PrinterState.PAPER_MISS:
                stateStr = "打印机缺纸!";
                break;
            case PrinterState.PAPER_ERROR:
                stateStr = "打印机纸装歪了!";
                break;
            case PrinterState.AUTH_MILEAGE_END:
            case PrinterState.NO_OFFICIAL_CARBON:
                stateStr = "打印机碳带未匹配!";
                break;
            case PrinterState.NORMAL:
                stateStr = "打印机就绪";
                break;
            default:
                stateStr = "打印机状态异常!";
                break;
        }
        return stateStr;
    }
}
